package com.ruoyi.boss.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.boss.mapper.TSendRadiusMapper;
import com.ruoyi.boss.domain.TSendRadius;
import com.ruoyi.boss.service.ITSendRadiusService;

/**
 * 派单半径Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-18
 */
@Service
public class TSendRadiusServiceImpl implements ITSendRadiusService 
{
    @Autowired
    private TSendRadiusMapper tSendRadiusMapper;

    /**
     * 查询派单半径
     * 
     * @param sendRadiusId 派单半径主键
     * @return 派单半径
     */
    @Override
    public TSendRadius selectTSendRadiusBySendRadiusId(Long sendRadiusId)
    {
        return tSendRadiusMapper.selectTSendRadiusBySendRadiusId(sendRadiusId);
    }

    /**
     * 查询派单半径列表
     * 
     * @param tSendRadius 派单半径
     * @return 派单半径
     */
    @Override
    public List<TSendRadius> selectTSendRadiusList(TSendRadius tSendRadius)
    {
        return tSendRadiusMapper.selectTSendRadiusList(tSendRadius);
    }

    /**
     * 新增派单半径
     * 
     * @param tSendRadius 派单半径
     * @return 结果
     */
    @Override
    public int insertTSendRadius(TSendRadius tSendRadius)
    {
        return tSendRadiusMapper.insertTSendRadius(tSendRadius);
    }

    /**
     * 修改派单半径
     * 
     * @param tSendRadius 派单半径
     * @return 结果
     */
    @Override
    public int updateTSendRadius(TSendRadius tSendRadius)
    {
        tSendRadius.setUpdateTime(DateUtils.getNowDate());
        return tSendRadiusMapper.updateTSendRadius(tSendRadius);
    }

    /**
     * 批量删除派单半径
     * 
     * @param sendRadiusIds 需要删除的派单半径主键
     * @return 结果
     */
    @Override
    public int deleteTSendRadiusBySendRadiusIds(Long[] sendRadiusIds)
    {
        return tSendRadiusMapper.deleteTSendRadiusBySendRadiusIds(sendRadiusIds);
    }

    /**
     * 删除派单半径信息
     * 
     * @param sendRadiusId 派单半径主键
     * @return 结果
     */
    @Override
    public int deleteTSendRadiusBySendRadiusId(Long sendRadiusId)
    {
        return tSendRadiusMapper.deleteTSendRadiusBySendRadiusId(sendRadiusId);
    }
}
